/* eslint-disable */
/* prettier-ignore */
import * as React from 'react';
import { TLogoTheme } from '../Logo';

export interface ILogoCircleProps {
  size?: number;
  theme?: TLogoTheme;
  className?: string;
}

const DEFAULT_SIZE = 48;

export const LogoCircle = ({
  size = 40,
  className,
  theme = 'dark',
}: ILogoCircleProps) => {
  const shouldAddStyle = size !== DEFAULT_SIZE;
  const pathProps = Object.assign({}, shouldAddStyle && {style: {transform: `scale(calc(${size} / ${DEFAULT_SIZE}))`}});

  const themeColorsMap = {
    dark: { fillPrimary: 'var(--pneumatic-color-black100)', fillSecondary: 'var(--pneumatic-color-link)' },
    light: { fillPrimary: 'var(--pneumatic-color-link)', fillSecondary: 'var(--pneumatic-color-black100)' },
  };

  const { fillPrimary, fillSecondary } = themeColorsMap[theme];

  return (
    <svg className={className} width={size} height={size} viewBox={`0 0 ${size} ${size}`} xmlns="http://www.w3.org/2000/svg">
      <circle cx={size / 2} cy={size / 2} r={size / 2} fill={fillPrimary}/>
      <path
        d="M18.3389 38.9942C17.4546 38.9933 16.6067 38.6286 15.9809 37.9799C15.3551 37.3312 15.0024 36.4515 15 35.5334V14.7681C15.0018 13.2389 15.5876 11.7728 16.6291 10.6915C17.6706 9.61013 19.0827 9.00183 20.5556 9H25C27.6522 9 30.1957 10.0939 32.0711 12.041C33.9464 13.9881 35 16.629 35 19.3826C35 22.1363 33.9464 24.7771 32.0711 26.7242C30.1957 28.6714 27.6522 29.7652 25 29.7652H22.7778C21.8937 29.7652 21.0459 29.4006 20.4208 28.7516C19.7956 28.1025 19.4444 27.2222 19.4444 26.3044C19.4444 25.3865 19.7956 24.5062 20.4208 23.8572C21.0459 23.2081 21.8937 22.8435 22.7778 22.8435H25C25.8841 22.8435 26.7319 22.4789 27.357 21.8298C27.9821 21.1808 28.3333 20.3005 28.3333 19.3826C28.3333 18.4647 27.9821 17.5845 27.357 16.9354C26.7319 16.2864 25.8841 15.9217 25 15.9217H22.7778C22.4831 15.9217 22.2005 16.0433 21.9921 16.2596C21.7837 16.476 21.6667 16.7694 21.6667 17.0754C21.6777 17.3777 21.7983 17.6645 22.0043 17.8784C22.2103 18.0924 22.4866 18.2176 22.7778 18.229C23.0725 18.229 23.3551 18.3505 23.5635 18.5669C23.7718 18.7832 23.8889 19.0767 23.8889 19.3826C23.8889 19.6886 23.7718 19.982 23.5635 20.1984C23.3551 20.4147 23.0725 20.5362 22.7778 20.5362C21.8973 20.5243 21.0561 20.1558 20.4335 19.5094C19.8108 18.8629 19.456 17.9895 19.4444 17.0754C19.4444 16.1575 19.7956 15.2772 20.4208 14.6282C21.0459 13.9791 21.8937 13.6145 22.7778 13.6145H25C26.4734 13.6145 27.8865 14.2222 28.9284 15.3039C29.9702 16.3857 30.5556 17.8528 30.5556 19.3826C30.5556 20.9124 29.9702 22.3796 28.9284 23.4613C27.8865 24.543 26.4734 25.1507 25 25.1507H22.7778C22.4831 25.1507 22.2005 25.2723 21.9921 25.4886C21.7837 25.705 21.6667 25.9984 21.6667 26.3044C21.6667 26.6103 21.7837 26.9038 21.9921 27.1201C22.2005 27.3364 22.4831 27.458 22.7778 27.458H25C27.0628 27.458 29.0411 26.6072 30.4997 25.0928C31.9583 23.5783 32.7778 21.5243 32.7778 19.3826C32.7778 17.2409 31.9583 15.1869 30.4997 13.6725C29.0411 12.158 27.0628 11.3072 25 11.3072H20.5556C19.6715 11.3072 18.8237 11.6719 18.1985 12.3209C17.5734 12.97 17.2222 13.8502 17.2222 14.7681V35.5334C17.2222 35.8407 17.3398 36.1354 17.5491 36.3528C17.7584 36.5701 18.0423 36.6922 18.3383 36.6922C18.6343 36.6922 18.9182 36.5701 19.1275 36.3528C19.3369 36.1354 19.4544 35.8407 19.4544 35.5334L19.4444 33.2319C19.4437 33.0799 19.4719 32.9293 19.5274 32.7886C19.5829 32.648 19.6647 32.5201 19.7679 32.4124C19.8712 32.3047 19.9939 32.2192 20.1291 32.1609C20.2642 32.1025 20.4092 32.0725 20.5556 32.0725C20.8502 32.0725 21.1329 32.194 21.3412 32.4104C21.5496 32.6267 21.6667 32.9202 21.6667 33.2261L21.6767 35.5207C21.679 35.9767 21.5945 36.4287 21.4281 36.8508C21.2616 37.2728 21.0164 37.6565 20.7067 37.9798C20.3969 38.3031 20.0286 38.5597 19.6231 38.7348C19.2175 38.9099 18.7826 39 18.3433 39L18.3389 38.9942Z"
        fill={fillSecondary}
        {...pathProps}
      />
    </svg>
  );
};
